package com.qm.console.pubdef.pubenum;

/**
 * @Auther: yilu
 * @Date: 2019/4/18 18:43
 * @Description:
 */
public enum ItemTypeEnum {
    coin(1, 1),
    diamond(2, 4),
    broadcast(3, 3),
    ;
    private Integer itemType;
    private Integer goodType;

    ItemTypeEnum(Integer itemType, Integer goodType) {
        this.itemType = itemType;
        this.goodType = goodType;
    }

    public Integer getGoodType() {
        return goodType;
    }

    public Integer getItemType() {
        return itemType;
    }

    public static ItemTypeEnum getItemTypeEnum(Integer itemType){
        for(ItemTypeEnum itemTypeEnum: values()){
            if(itemTypeEnum.itemType.equals(itemType)){
                return itemTypeEnum;
            }
        }
        return coin;
    }
}
